home *** CD-ROM | disk | FTP | other *** search
- # Indra's Net. Trumpet Winsock login script Version 2.0
- # Spike 9/1/95
-
- # Uncomment the next line if you want to watch the script run.
- #trace on
-
- # If you need to send an initialization string to your modem, fill it in
- # below. Leave off the "AT", for example: $modemsetup = "&F"
- $modemsetup = ""
-
- # Don't change these (unless you really, really, want to).
-
- $prompt = "net%"
- $loginprompt = "ogin:"
- $passprompt = "assword:"
-
- if %ppp
- $tia = "tia -ppp"
- else
- $tia = "tia -slip"
- end
-
- # Find the stored account name and password, or prompt for them.
-
- if ![load $username]
- if [username "Enter your account name"]
- save $username
- end
- end
- if ![load $password]
- if [password "Enter your password"]
- save $password
- end
- end
-
- if ![load $number]
- $number = "786-7405"
- save $number
- end
-
- # Number of attempts to get connected.
- %attempts = 10
-
- # initialize modem
-
- output "atz"\r
- if ! [input 10 OK\n]
- display "Modem is not responding"\n
- abort
- end
-
- # Sent initialization, or just "AT".
- output "at"$modemsetup\r
- input 10 OK\n
-
- # Dial up to the number of attempts defined above.
- %n = 0
- repeat
- if %n = %attempts
- display "Too many dial attempts"\n
- abort
- end
- output "atdt"$number\r
- %ok = [input 60 CONNECT]
- %n = %n + 1
- until %ok
- input 10 \n
-
- # Wait a little bit to make sure we are connected.
- wait 30 dcd
-
- # Hit enter to make sure we get a prompt
- output \n
-
- # Look for the "login:" prompt and send account name.
- input 30 $loginprompt
- output $username\n
-
- # Now "password:"
- input 30 $passprompt
- output $password\n
-
- # We are in, look for the "net%" prompt and then start TIA
-
- input 30 $prompt
- output $tia\n
- display \n
- display "Connected to Indra's Net.\n"